<?php
	global $_W,$_GPC;
	if($_W['role']){
		$pindex = max(1, intval($_GPC['page']));	
		$psize = 10;
		$sql = "SELECT g.id,g.tid,g.goodsname,g.grounding,g.price,g.orderid,g.summary,g.ishot,c.id as cid,c.categoryname FROM".tablename('mii_ang_goods')." g LEFT JOIN ".tablename('mii_ang_class')." c ON g.tid=c.id WHERE g.uniacid = {$_W['uniacid']}  ORDER BY g.id DESC LIMIT ".($pindex-1)*$psize.','.$psize;
		$goods = pdo_fetchall($sql);
		$countSql = "SELECT COUNT(*)FROM " . tablename('mii_ang_goods')." g LEFT JOIN ".tablename('mii_ang_class')." c ON g.tid=c.id WHERE g.uniacid = {$_W['uniacid']}";
		$total = pdo_fetchcolumn($countSql);
		$pager = pagination($total, $pindex, $psize,$url='',$context = array('before' =>1, 'after' => 1, 'ajaxcallback' => '', 'callbackfuncname' => ''));		
		include $this->template('web/goods/goodslist');
	}else{
		message('没有操作权限');
	}


?>